package cn.ty.doc;

import java.io.IOException;
import java.util.List;
import java.util.Map;

import cn.summit.utils.POIDataReader;
import lombok.extern.slf4j.Slf4j;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author summit
 * @since 2021/6/24 10:37
 */
@RestController
@RequestMapping("/poi")
@Slf4j
public class PoiTestController {


	@PostMapping("import")
	public void importExcel( @RequestParam MultipartFile file) throws IOException {

		POIDataReader reader = new POIDataReader(file.getInputStream());

		Map<Integer, List<String[]>> integerListMap = reader.readExcelContent();

		log.info("data,{}",integerListMap);
	}


}
